<?php
  class Plugins_Buttonlink extends model {
  
  
  
  function getformadd($productid="")
  {
  

  

  
  
//  $str='<div>VDO<div class="vdoclass" style="width:640px;height:360px"></div><div><input type="button" name="link[]" value="link"></div></div>';
 
  $str='<div class="wrpPlg clBg5 clBd2 bdFull">
                    <div class="plgArea vdoclass"></div>
                    <div class="wrpOutAtcPlg">
                        <div class="wrpAtcPlg">
                            <span class="ico icoOri icoVdoPlg"></span>
                            <div class="spnAtcPlg clTxtW">
                                <span class="txtAtcPlg fs03">VDO</span>
                            </div>
                        </div>
                    </div>
                    <div class="wrpTl">
                        <div title="Close" class="btnIco closeTl clBd3 mgBtm10 deleterowbutton">
                            <span class="ico icoCloseTl"></span>
                        </div>
                        <div class="addTool">
                            <div title="Link" class="btnIco addLnkVdoTl clBd3 bdBtm linkvdobutton">
                                <span class="ico icoAddLnkTl"></span>
                            </div>
                            <div title="Remove" class="btnIco btnRmvTl deletevdobutton">
                                <span class="ico icoRmvTl"></span>
                            </div>
                        </div>
                    </div>
                    <span class="desPlg clTxt3 fs03">Explain more about your stuff by add some vdo clip for it.</span>
                </div>';
                
                
  $code  = '<div class="wrpPlg clBg5 clBd2 bdFull">'."\n";
$code .= '<div class="wrpOutAtcPlg">'."\n";
$code .= '<div class="wrpAtcPlg">'."\n";
$code .= '<span class="ico3 icoBtnPlg"></span>'."\n";
$code .= '<div class="spnAtcPlg clTxtW">'."\n";
$code .= '<span class="txtAtcPlg fs03">Button</span>'."\n";
$code .= '</div>'."\n";
$code .= '</div>'."\n";
$code .= '</div>'."\n";
$code .= '<div class="wrpTl">'."\n";
$code .= '<div title="Close" class="btnIco closeTl clBd3 mgBtm10 deleterowbutton">'."\n";
$code .= '<span class="ico icoCloseTl"></span>'."\n";
$code .= '</div>'."\n";
$code .= '</div>'."\n";
$code .= '<form class="frmFrmPlg clTxt3 fs03">'."\n";
$code .= '<fieldset class="wrpFrmPlg">'."\n";
$code .= '<table class="tbGenInfo tbAddCtnt clTxt3 fs03">'."\n";
$code .= '<tbody><tr>'."\n";
$code .= '<th>Button Name</th>'."\n";
$code .= '<td>'."\n";
$code .= '<input type="text" name="btnname[]" class="clBg5 clBd2 fs03 clTxt2" kl_virtual_keyboard_secure_input="on">'."\n";
$code .= '</td>'."\n";
$code .= '</tr>'."\n";
$code .= '<tr>'."\n";
$code .= '<th>Link</th>'."\n";
$code .= '<td>'."\n";
$code .= '<input type="text" name="btnlink[]" class="clBg5 clBd2 fs03 clTxt2" kl_virtual_keyboard_secure_input="on">'."\n";
$code .= '</td>'."\n";
$code .= '</tr>'."\n";
$code .= '</tbody></table>'."\n";
$code .= '</fieldset>'."\n";
$code .= '</form>'."\n";
$code .= '</div>';
 
 
  $arraydata['form']=addslashes(str_replace(array("\r", "", "\r"), '', $code));
 // $arraydata['js'][]=pluginjsinfo.'/vdo.js';


  
  
      
  
  
  
  return $arraydata;
  
  
  
  
  
  
  
  }
  
  function getformlanding($arraydata)
  {
$code  = '<div class="ldIt wrpBtnLd clBg4">'."\n";
$code .= '<div class="wrpBooking">'."\n";
$code .= '<div class="booking clBgSp2">'."\n";
$code .= '<a href="'.$arraydata['url'].'">'."\n";

$name="Button";
if($arraydata['name'])
{
$name=$arraydata['name'];

}

$code .= '<span class="clTxtW fs11">'.$name.'</span>'."\n";
$code .= '</a>'."\n";
$code .= '</div>'."\n";
$code .= '</div>'."\n";
$code .= '</div>';

$data['str']=$code;
$data['target']='secondtarget';

return $data;
  
  
  }
  
  function getplugin($plugreid)
  {
  
  $sql="select * from tb_plugins_buttonlink where plugreid=".$plugreid;
  $arrayplugin=$this->db->db_set_1recordrow($sql);
  

  return $arrayplugin;
  
  

  
  }
  
  function saveplugin($arraydata,$productid,$plugreid)
  {
  
  $arraydata['productid']=$productid;
  $arraydata['plugreid']=$plugreid;
  $this->db->db_set($arraydata,'tb_plugins_buttonlink');
  
  }
  
  
  }
?>
